package com.ontheroad.mysql.circle.mapper;

import com.ontheroad.circle.model.CircleModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.mybatis.mapper.interfaces.GenericMapper;

import java.util.Collection;
import java.util.List;


/**
 * CircleDAO接口
 *
 * @author admin
 */
public interface CircleMapper extends GenericMapper<CircleModel, Integer> {

    List<CircleModel> getListByUserId(@Param("userId") Integer userId, @Param("rowBounds") RowBounds rowBounds);

    List<CircleModel> getIndexListByUserId(@Param("userId") Integer userId, @Param("rowBounds") RowBounds rowBounds);

    List<CircleModel> findNearCicle(@Param("lngMin") double lngMin, @Param("lngMax") double lngMax, @Param("latMin") double latMin, @Param("latMax") double latMax, @Param("rowBounds") RowBounds rowBounds);

    List<CircleModel> getFriendCricleList(@Param("ids") List<Integer> ids, @Param("rowBounds") RowBounds rowBounds);

    List<Integer> getFriendIds(Integer userId);

    List<CircleModel> findModelsByTopicId(@Param("topicId") Integer topicId, @Param("rowBounds") RowBounds rowBounds);

    void updateCareChooseByIds(@Param("circleId") Integer circleId, @Param("careChose") Boolean careChose);
}
